package player;
 
import packet.PacketConstant;
import thread.GameThread;

public class PlayerThread extends GameThread 
{
	public PlayerThread()
	{
		playerManager = new PlayerManager();
	}
	
	public boolean addPlayer(Player player)
	{
		return playerManager.addPlayer(player);
	}
	
	public boolean removePlayer(Player player)
	{
		return playerManager.removePlayer(player);
	}
	
	public void doWork(long nowInMillis) 
	{
		playerManager.processMessage(nowInMillis, getModuleFlag());
	}
	  
	public String getThreadName() 
	{
		return "PlayerThread";
	}
	
	public int getModuleFlag()
	{
		return PacketConstant.PACKET_ALLOWABLE_LOGIN;
	}
 
	public int getTickInterval() 
	{
		return 10;
	}

	private PlayerManager playerManager;
}
